<nav id="column-left" class="active">
    <div id="profile">
      <div><i class="fa fa-user fa-fw"></i></div>
      <div>
        <h4><?=$users['account'];?></h4>
        <small><?= $rolename?></small>
      </div>
    </div>
    <ul id="menu">
    <?php $leftMenus = $this->permissionTree; ?>
    <?php if(is_array($leftMenus)) foreach ($leftMenus as $k1 => $v1): ?>
        <?php if ($v1['is_menu']):?>
            
            <li class="catalog"><a class="parent"><i class="fa fa-<?=$v1['id'] ?> fa-fw"></i><span><?= ($this->uri->segment(1) == 'sc' || !$v1['title_en']) ? $v1['title'] : $v1['title_en'] ?></span></a>
                <ul class="collapse">
                    <?php if(is_array($v1['children'])) foreach ($v1['children'] as $k2 => $v2):?>
                        <?php if ($v2['is_menu']):?>
                        <li class="catalog-second">
                            <a class="parent"><?= ($this->uri->segment(1) == 'sc' || !$v2['title_en']) ? $v2['title'] : $v2['title_en'] ?></a>
                            <ul class="collapse">
                            <?php if(is_array($v2['children'])) foreach ($v2['children'] as $k3 => $v3): ?>
                                <li <?php echo $this->permissionParentIds[3] == $v3['id'] ? 'class="menu-oms"' : ''; ?>>
                                    <a href="<?= $v3['url'] ?>"><?= ($this->uri->segment(1) == 'sc' || !$v3['title_en']) ? $v3['title'] : $v3['title_en'] ?></a>
                                </li>
                            <?php endforeach;?>
                            </ul>
                        </li>
                        <?php endif;?>
                    <?php endforeach;?>
                </ul>
            </li>
        <?php endif; ?>
    <?php endforeach;?>
    </ul>
</nav>